package com.zezheng.qian.project.base.service.impl;

import java.util.List;
import com.zezheng.qian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zezheng.qian.project.base.mapper.BTransactorMapper;
import com.zezheng.qian.project.base.domain.BTransactor;
import com.zezheng.qian.project.base.service.IBTransactorService;

/**
 * 安心签经办人Service业务层处理
 *
 * @author cuijie
 * @date 2023-10-23
 */
@Service
public class BTransactorServiceImpl implements IBTransactorService
{
    @Autowired
    private BTransactorMapper bTransactorMapper;

    /**
     * 查询安心签经办人
     *
     * @param id 安心签经办人主键
     * @return 安心签经办人
     */
    @Override
    public BTransactor selectBTransactorById(Long id)
    {
        return bTransactorMapper.selectBTransactorById(id);
    }

    /**
     * 查询安心签经办人列表
     *
     * @param bTransactor 安心签经办人
     * @return 安心签经办人
     */
    @Override
    public List<BTransactor> selectBTransactorList(BTransactor bTransactor)
    {
        return bTransactorMapper.selectBTransactorList(bTransactor);
    }

    /**
     * 新增安心签经办人
     *
     * @param bTransactor 安心签经办人
     * @return 结果
     */
    @Override
    public int insertBTransactor(BTransactor bTransactor)
    {
        bTransactor.setCreateTime(DateUtils.getNowDate());
        return bTransactorMapper.insertBTransactor(bTransactor);
    }

    /**
     * 修改安心签经办人
     *
     * @param bTransactor 安心签经办人
     * @return 结果
     */
    @Override
    public int updateBTransactor(BTransactor bTransactor)
    {
        bTransactor.setUpdateTime(DateUtils.getNowDate());
        return bTransactorMapper.updateBTransactor(bTransactor);
    }

    /**
     * 批量删除安心签经办人
     *
     * @param ids 需要删除的安心签经办人主键
     * @return 结果
     */
    @Override
    public int deleteBTransactorByIds(Long[] ids)
    {
        return bTransactorMapper.deleteBTransactorByIds(ids);
    }

    /**
     * 删除安心签经办人信息
     *
     * @param id 安心签经办人主键
     * @return 结果
     */
    @Override
    public int deleteBTransactorById(Long id)
    {
        return bTransactorMapper.deleteBTransactorById(id);
    }
}
